home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 1.iso / dist / fw_apache2.idb / usr / freeware / apache2 / include / ssl_expr.h.z / ssl_expr.h
C/C++ Source or Header  |  2002-07-08  |  4KB  |  137 lines

  1. /*                      _             _
  2. **  _ __ ___   ___   __| |    ___ ___| |  mod_ssl
  3. ** | '_ ` _ \ / _ \ / _` |   / __/ __| |  Apache Interface to OpenSSL
  4. ** | | | | | | (_) | (_| |   \__ \__ \ |  www.modssl.org
  5. ** |_| |_| |_|\___/ \__,_|___|___/___/_|  ftp.modssl.org
  6. **                      |_____|
  7. **  ssl_expr.h
  8. **  Expression Handling (Header)
  9. */
  10.  
  11. /* ====================================================================
  12.  * The Apache Software License, Version 1.1
  13.  *
  14.  * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
  15.  * reserved.
  16.  *
  17.  * Redistribution and use in source and binary forms, with or without
  18.  * modification, are permitted provided that the following conditions
  19.  * are met:
  20.  *
  21.  * 1. Redistributions of source code must retain the above copyright
  22.  *    notice, this list of conditions and the following disclaimer.
  23.  *
  24.  * 2. Redistributions in binary form must reproduce the above copyright
  25.  *    notice, this list of conditions and the following disclaimer in
  26.  *    the documentation and/or other materials provided with the
  27.  *    distribution.
  28.  *
  29.  * 3. The end-user documentation included with the redistribution,
  30.  *    if any, must include the following acknowledgment:
  31.  *       "This product includes software developed by the
  32.  *        Apache Software Foundation (http://www.apache.org/)."
  33.  *    Alternately, this acknowledgment may appear in the software itself,
  34.  *    if and wherever such third-party acknowledgments normally appear.
  35.  *
  36.  * 4. The names "Apache" and "Apache Software Foundation" must
  37.  *    not be used to endorse or promote products derived from this
  38.  *    software without prior written permission. For written
  39.  *    permission, please contact apache@apache.org.
  40.  *
  41.  * 5. Products derived from this software may not be called "Apache",
  42.  *    nor may "Apache" appear in their name, without prior written
  43.  *    permission of the Apache Software Foundation.
  44.  *
  45.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  46.  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  47.  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  48.  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  49.  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  50.  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  51.  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  52.  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  53.  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  54.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  55.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  56.  * SUCH DAMAGE.
  57.  * ====================================================================
  58.  */
  59.                              /* ``May all your PUSHes be POPed.'' */
  60.  
  61. #ifndef __SSL_EXPR_H__
  62. #define __SSL_EXPR_H__
  63.  
  64. #ifndef FALSE
  65. #define FALSE 0
  66. #endif
  67.  
  68. #ifndef TRUE
  69. #define TRUE !FALSE
  70. #endif
  71.  
  72. #ifndef YY_NULL
  73. #define YY_NULL 0
  74. #endif
  75.  
  76. #ifndef MIN
  77. #define MIN(a,b) (((a)<(b))?(a):(b))
  78. #endif
  79.  
  80. #ifndef BOOL
  81. #define BOOL unsigned int
  82. #endif
  83.  
  84. #ifndef NULL
  85. #define NULL (void *)0
  86. #endif
  87.  
  88. #ifndef NUL
  89. #define NUL '\0'
  90. #endif
  91.  
  92. #ifndef YYDEBUG
  93. #define YYDEBUG 0
  94. #endif
  95.  
  96. typedef enum {
  97.     op_NOP, op_ListElement,
  98.     op_True, op_False, op_Not, op_Or, op_And, op_Comp,
  99.     op_EQ, op_NE, op_LT, op_LE, op_GT, op_GE, op_IN, op_REG, op_NRE,
  100.     op_Digit, op_String, op_Regex, op_Var, op_Func
  101. } ssl_expr_node_op;
  102.  
  103. typedef struct {
  104.     ssl_expr_node_op node_op;
  105.     void *node_arg1;
  106.     void *node_arg2;
  107. } ssl_expr_node;
  108.  
  109. typedef ssl_expr_node ssl_expr;
  110.  
  111. typedef struct {
  112.     apr_pool_t *pool;
  113.     char     *inputbuf;
  114.     int       inputlen;
  115.     char     *inputptr;
  116.     ssl_expr *expr;
  117. } ssl_expr_info_type;
  118.  
  119. extern ssl_expr_info_type ssl_expr_info;
  120. extern char *ssl_expr_error;
  121.  
  122. #define yylval  ssl_expr_yylval
  123. #define yyerror ssl_expr_yyerror
  124. #define yyinput ssl_expr_yyinput
  125.  
  126. extern int ssl_expr_yyparse(void);
  127. extern int ssl_expr_yyerror(char *);
  128. extern int ssl_expr_yylex(void);
  129.  
  130. extern ssl_expr *ssl_expr_comp(apr_pool_t *, char *);
  131. extern int       ssl_expr_exec(request_rec *, ssl_expr *);
  132. extern char     *ssl_expr_get_error(void);
  133. extern ssl_expr *ssl_expr_make(ssl_expr_node_op, void *, void *);
  134. extern BOOL      ssl_expr_eval(request_rec *, ssl_expr *);
  135.  
  136. #endif /* __SSL_EXPR_H__ */
  137.